﻿
    using Chain.BLL;
    using Chain.Model;
    using System;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;

    public partial class GoodsAllot : PageBase
    {


        protected void Page_Load(object sender, EventArgs e)
        {
            if (base.IsPostBack)
            {
                return;
            }
            PubFunction.BindShopSelect(1, this.sltOutShopID, true);
            this.sltOutShopID.Value = this._UserShopID.ToString();
            PubFunction.BindShopSelect(base._UserShopID, this.sltInShopID, true);
            this.lblUSer.InnerText = base._UserName;
            this.spGoodsAccounte.InnerText = base.curParameter.strGoodsAllotPrefix + DateTime.Now.ToString("yyMMddHHmmssffff");
            this.txtCreateTime.Value = DateTime.Now.ToString();
            if (base.Request.QueryString["Type"] != null)
            {
                switch (Convert.ToInt32(base.Request.QueryString["Type"]))
                {
                    case 1:
                        this.sltInShopID.Value = this._UserShopID.ToString();
                        this.sltInShopID.Attributes.Add("disabled", "disabled");
                        break;

                    case 2:
                        this.sltOutShopID.Value = this._UserShopID.ToString();
                        this.sltOutShopID.Attributes.Add("disabled", "disabled");
                        goto Label_013A;
                }
            }
        Label_013A:
            if (base.Request.QueryString["AllotID"] != null)
            {
                int AllotID = Convert.ToInt32(base.Request.QueryString["AllotID"]);
                Chain.Model.GoodsAllot modelAllot = new Chain.BLL.GoodsAllot().GetModel(AllotID);
                this.spGoodsAccounte.InnerText = modelAllot.AllotAccount;
                this.txtExRemark.Value = modelAllot.AllotRemark;
                this.HidAllotID.Value = AllotID.ToString();
                this.HidExit.Value = "2";
                this.sltOutShopID.Value = modelAllot.AllotOutShopID.ToString();
                this.sltOutShopID.Attributes.Add("disabled", "disabled");
                this.sltInShopID.Value = modelAllot.AllotInShopID.ToString();
                this.sltInShopID.Attributes.Add("disabled", "disabled");
            }
        }
    }


